<?php

namespace App\Http\Controllers;

use App\Models\Goods;
use App\Models\System;

class GoodsController extends BaseController
{
    /**
     * @return
     * 商品列表
     */
    public function index(){

        $datas = Goods::where('is_show' , 1)->orderByDesc('id')->get(['id' , 'goods_name' , 'goods_prices' , 'goods_cover' , 'pictures']);

        return view('goods/index', ['datas' => $datas , 'banner' => System::where('id' , 999)->value('banner')]);
    }


    /**
     * 商品详情
     */
    public function detail(){
        return view('goods/detail');
    }
}
